Optimal. Leaf size=52 \[ x (a B+A b)+\frac {a A \sin (c+d x)}{d}+\frac {(a C+b B) \tanh ^{-1}(\sin (c+d x))}{d}+\frac {b C \tan (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.135, Rules used = {4076, 4047, 8, 4045, 3770} \[ x (a B+A b)+\frac {a A \sin (c+d x)}{d}+\frac {(a C+b B) \tanh ^{-1}(\sin (c+d x))}{d}+\frac {b C \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3770
Rule 4045
Rule 4047
Rule 4076
Rubi steps
\begin {align*} \int \cos (c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {b C \tan (c+d x)}{d}+\int \cos (c+d x) \left (a A+(A b+a B) \sec (c+d x)+(b B+a C) \sec ^2(c+d x)\right ) \, dx\\ &=\frac {b C \tan (c+d x)}{d}+(A b+a B) \int 1 \, dx+\int \cos (c+d x) \left (a A+(b B+a C) \sec ^2(c+d x)\right ) \, dx\\ &=(A b+a B) x+\frac {a A \sin (c+d x)}{d}+\frac {b C \tan (c+d x)}{d}+(b B+a C) \int \sec (c+d x) \, dx\\ &=(A b+a B) x+\frac {(b B+a C) \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a A \sin (c+d x)}{d}+\frac {b C \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 71, normalized size = 1.37 \[ \frac {a A \sin (c) \cos (d x)}{d}+\frac {a A \cos (c) \sin (d x)}{d}+a B x+\frac {a C \tanh ^{-1}(\sin (c+d x))}{d}+A b x+\frac {b B \tanh ^{-1}(\sin (c+d x))}{d}+\frac {b C \tan (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.51, size = 101, normalized size = 1.94 \[ \frac {2 \, {\left (B a + A b\right )} d x \cos \left (d x + c\right ) + {\left (C a + B b\right )} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (C a + B b\right )} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (A a \cos \left (d x + c\right ) + C b\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.27, size = 134, normalized size = 2.58 \[ \frac {{\left (B a + A b\right )} {\left (d x + c\right )} + {\left (C a + B b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (C a + B b\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.94, size = 88, normalized size = 1.69 \[ A b x +a B x +\frac {a A \sin \left (d x +c \right )}{d}+\frac {A b c}{d}+\frac {B b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {B a c}{d}+\frac {b C \tan \left (d x +c \right )}{d}+\frac {a C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 92, normalized size = 1.77 \[ \frac {2 \, {\left (d x + c\right )} B a + 2 \, {\left (d x + c\right )} A b + C a {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + B b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, A a \sin \left (d x + c\right ) + 2 \, C b \tan \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.26, size = 153, normalized size = 2.94 \[ \frac {C\,b\,\mathrm {tan}\left (c+d\,x\right )}{d}+\frac {2\,A\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,a\,\sin \left (2\,c+2\,d\,x\right )}{2\,d\,\cos \left (c+d\,x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right ) \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________